package lzy.service.impl;

import lzy.entity.PestDetection;
import lzy.mapper.PestDetectionMapper;
import lzy.service.PestDetectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PestDetectionServiceImpl implements PestDetectionService {
    @Autowired
    private PestDetectionMapper pestDetectionMapper;

    @Override
    public List<PestDetection> getPendingPests() {
        return pestDetectionMapper.selectPendingPests();
    }

    @Override
    public void updateStatus(Integer detectId, String status) {
        pestDetectionMapper.updateStatus(detectId, status);
    }

    @Override
    public int countReviewedIn7Days() {
        return pestDetectionMapper.countReviewedIn7Days();
    }

    @Override
    public int countAllReviewed() {
        return pestDetectionMapper.countAllReviewed();
    }

    @Override
    public int countAll() {
        return pestDetectionMapper.countAll();
    }
}